package com.cwz.log.service;

import com.cwz.api.entity.SysOperLog;
import com.cwz.api.remote.RemoteLogService;
import com.cwz.core.constant.SecurityConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @program: w-demo
 * @description: 异步调用日志服务
 * @author: Wen
 **/
@Service
public class AsyncLogService {
	@Autowired
	private RemoteLogService remoteLogService;

	/**
	 * @Description: 保存系统日志记录
	 * @Author: Wen
	 * @param sysOperLog:	系统日志实体
	 * @return: void
	 **/
	@Async
	public void saveSysLog(SysOperLog sysOperLog) {
		this.remoteLogService.saveLog(sysOperLog, SecurityConstants.INNER);
	}
}
